<html lang="zh-cn">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="description" content="小娜聊天机器人">
		<meta name="keywords" content="小娜聊天机器人">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<meta name="format-detection" content="telephone=no">
		<title>小娜聊天机器人</title>
<!--{#		<link rel="icon" href="/App/static/images/favicon.ico" type="image/x-icon">#}-->
<!--		<link rel="stylesheet" href="/App/static/css/style2.css">-->
		<link rel="stylesheet" href="{{ url_for('static',filename='css/style2.css') }}">
<!--		<script type="text/javascript" src="/App/static/js/jquery-3.3.1.min.js"></script>-->
		<script type="text/javascript" src="{{ url_for('static',filename='js/jquery-3.3.1.min.js') }}"></script>
{#		<script type="text/javascript" src="/App/static/js/chat.js"></script>#}
		<script type="text/javascript" src="{{ url_for('static',filename='js/chat.js') }}"></script>
<!-- 		<script type="text/javascript" src="js/hidden.js"></script> -->
	</head>

	<body>

		<div class="speak_window">
			<div class="speak_box">
				<div class="answer">
{#					<div class="icon left"><img src="/App/static/images/ai.png"></div>#}
					<div class="icon left"><img src="{{ url_for('static',filename='images/ai.png') }}"></div>

					<div class="answer_text">

						<p id="Greeting"></p>

						<script>
							var now = new Date();
							var hour = now.getHours();
							var V;
							if(hour > 4 && hour <= 10) {
								V = "早上好！";
							} else if(hour > 10 && hour <= 13) {
								V = "中午好！";
							} else if(hour > 13 && hour <= 17) {
								V = "下午好！";
							} else {
								V = "晚上好！";
							}
							document.getElementById("Greeting").innerHTML = V + "我是小娜，很高心为您服务！为您提供知识产权领域常见问题的解答。您也可以从以下几个大类选择。";
						</script>
						<div class="choose">

							<div class="pt">
								<div class="icon-list">
{#									<img src="/App/static/images/常见问题.png" />#}
									<img src="{{ url_for('static',filename='images/常见问题.png') }}" />
								</div>
								<div class="pecture-text">
									<a href="#" onclick="get_data()">常见问题</a>
<!-- 									<script type="text/javascript">
										function get_data() {
											$.ajax({
												type: "get",
												url: "xxx",
												dataType: "json",
												success: function(data) {
													var result = data['result']
													var ans = '<div class="answer">' +
														'<div class="icon left"><img src="images/ai.png"/></div>' +
														'<div class="answer_text"><p id="content" style="white-space: pre-line;">' + result + '</p>' +
														'</div><div id="subText"></div><a id="btn" onclick="change()" style="color: blue;"></a></div>';

													$('.speak_box').append(ans);
													fit_screen();
												},
												error: function(XMLHttpRequest, textStatus, errorThrown) {
													alert("服务器出错：" + XMLHttpRequest.status);
												}
											});
										}
									</script> -->
								</div>
							</div>

							<div class="pt">
								<div class="icon-list">
{#									<img src="/App/static/images/维权服务.png" />#}
									<img src="{{ url_for('static',filename='images/维权服务.png') }}" />
								</div>
								<div class="pecture-text">
									<a href="" target="_blank">维权服务</a>
								</div>
							</div>

							<div class="pt">
								<div class="icon-list">
{#									<img src="/App/static/images/机构信息.png" />#}
									<img src="{{ url_for('static',filename='images/机构信息.png') }}" />
								</div>
								<div class="pecture-text">
									<a href="" target="_blank" >机构信息</a>
								</div>

							</div>

							<div class="pt">
								<div class="icon-list">
{#									<img src="/App/static/images/便民入口.png" />#}
									<img src="{{ url_for('static',filename='images/便民入口.png') }}" />
								</div>
								<div class="pecture-text">
									<a href="" target="_blank">xx/a>
								</div>
							</div>

						</div>

						<!--<i></i>-->
					</div>
					<div id="subText"></div>
					<a id="btn" onclick="change()" style="color: blue;"></a>

				</div>
			</div>
		</div>

		<div class="footer">
			<div class="circle left">
				<a href="xx">
{#					<img src="/App/static/images/keyboard.png">#}
					<img src="{{ url_for('static',filename='images/keyboard.png') }}">
				</a>
			</div>
			<div class="chat_box left">
				<input type="text" onKeyUp="key_up()" placeholder="说点什么吧~~~" />
			</div>
			<div class="rectangle right">
				<button onClick="send_message()">发送</button>
			</div>
		</div>

		<script type="text/javascript">
			$(function() {
				$(document).keydown(function(event) {
					if(event.keyCode == 13) {
						send_message();
					}
				});

				$('.chat_box input').focus();
			});

			//			var text;
			//
			//			function show() {
			//				text=document.getElementById("Greeting").innerHTML;
			//				if(text.length > 20) {
			//					document.getElementById("subText").innerHTML = text.substring(0, 20);
			//					document.getElementById("btn").innerHTML = "...查看全文";
			//				} else {
			//					document.getElementById("subText").innerHTML = text;
			//					document.getElementById("btn").innerHTML = "";
			//				}
			//			}
			//
			//			function change() {
			//				var t = document.getElementById("btn");
			//				var tt = document.getElementById("subText");
			//				if(t.innerHTML == "...查看全文") {
			//					tt.innerHTML = text;
			//					t.innerHTML = "收起"
			//				} else {
			//					tt.innerHTML = text.substring(0, 20);
			//					t.innerHTML = "...查看全文"
			//				}
			//			}
			//			show();
		</script>

	</body>

</html>
